Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exec-buffer

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exec-buffer

Run a buffer through a child process

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
479K
decreased by-16.34%
Maintainers
1
Weekly downloads
 
Created

What is exec-buffer?

The exec-buffer npm package is a utility for executing a buffer, typically used for processing images or other binary data. It provides a simple interface to run a binary and buffer the output, making it useful for tasks that involve manipulating binary data streams.

What are exec-buffer's main functionalities?

Execute a binary with input and output buffers

This feature allows you to execute a binary with input and output buffers. In this example, the input buffer is read from 'input.png', processed by the 'optipng' binary, and the output buffer is written to 'output.png'.

const execBuffer = require('exec-buffer');
const fs = require('fs');
const path = require('path');
const execa = require('execa');

(async () => {
  const input = fs.readFileSync('input.png');
  const output = await execBuffer({
    input,
    bin: 'optipng',
    args: ['-out', execBuffer.output]
  });
  fs.writeFileSync('output.png', output);
})();

Other packages similar to exec-buffer

Keywords

FAQs

Package last updated on 14 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc